From 6a883b0d6a42592ba812461e41d46435b60c88a7 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 9 Mar 2006 11:16:46 +0100 Subject: [PATCH] Fix order-of-evaluation issue in xc_domain_dumpcore. The intent is to move blocks of memory 4096 pages at a time, and a buffer is allocated for this. Unfortunately, the #define is without parentheses and %/* are the same order and evaluated left to right. Result: very big buffer being used 4 pages at a time. Signed-off-by: Ben Thomas (bthomas@virtualiron.com) --- tools/libxc/xc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c index 34c6d16a8c..6e403f0e99 100644 --- a/tools/libxc/xc_core.c +++ b/tools/libxc/xc_core.c @@ -6,7 +6,7 @@ #include /* number of pages to write at a time */ -#define DUMP_INCREMENT 4 * 1024 +#define DUMP_INCREMENT (4 * 1024) #define round_pgup(_p) (((_p)+(PAGE_SIZE-1))&PAGE_MASK) static int -- 2.30.2